﻿<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="~/css/aui.css" />
    <style type="text/css">
        .header {
            padding: 2.5rem 0.5rem 2rem 0.5rem;
        }
    </style>
</head>
<body>
    <br />
    <header class="aui-bar aui-bar-nav aui-text-left header" id="header">
        <h1>
            <a class="aui-btn aui-pull-right" tapmode onclick="openClub()">
                <i class="aui-iconfont aui-icon-question"></i>
            </a>
            您的账户已被冻结
        </h1>
    </header>
    <div class="aui-content-padded">
        <h1>
            <div class="aui-tips aui-margin-b-15" id="tips-1">
                <i class="aui-iconfont aui-icon-info"></i>
                <div class="aui-tips-title">
                    您的账户已被冻结
                    请等待或联系管理员更改你的账户权限。
                </div>
                <em class="aui-iconfont aui-icon-menu"></em>
            </div>
            <h1>
                <p>
                    <a href="/Home/Login">
                        <div class="aui-btn aui-btn-info aui-btn-block aui-btn-outlined aui-btn-sm">返回登陆界面</div>
                    </a>
                </p>
                </p>
                <input id="userName" type="hidden" value="@ViewData["id"]" />
                <a href="/home/nofreeze?id=@ViewData["id"]" class="aui-btn aui-btn-info aui-btn-block aui-btn-outlined aui-btn-sm" type="button" id="sendBtn">发送解冻请求</a>
    </div>
</body>
</html>
<script src="~/lib/signalr/dist/browser/signalr.js"></script>
<script type="text/javascript">
    const connection = new signalR.HubConnectionBuilder()
        .withUrl("/myChatHub")
        .configureLogging(signalR.LogLevel.Information)
        .build();
    connection.start().catch(err => console.error(err.toString()));

    document.getElementById("sendBtn").addEventListener("click", function () {
        var user = document.getElementById('userName').value;//从客户端中调用在此调用之前在自定义Hub定义的SendMessage方法
        connection.invoke("SendMessage", user, 1).catch(err => console.error(err.toString()));
    });</script>
